519595285 by Unknown
Author:Unknown
Language: eng
Format: epub
5.7 Verification of text on a page using the Assert class
In the code listing of section we have invoked the verifyUser(String) method from the Homepage Page Object. This Page Object had made use of the assertEquals method from the Assert class. This method is provided the following arguments: an actual string and an expected string. The actual string is the text extracted from the WebElement named userDisplay and this string is extracted using the following code snippet:
SingletonDriver.getInstance().getDrvr().findElement(userDisplay).getText()
The Expected string value is taken from the Feature file. The line from the Feature file shown as follows provides this value.
Then, the User should be shown on top-left hand corner of the page.
If we change the string in the preceding line to âPinakin Chaubal1â, the test now fails with an Assertion error shown as follows:
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Twisted Games: A Forbidden Royal Bodyguard Romance by Ana Huang(3685)
Den of Vipers by K.A Knight(2577)
The Push by Ashley Audrain(2575)
Win by Harlan Coben(2524)
Echo by Seven Rue(2142)
Beautiful World, Where Are You: A Novel by Sally Rooney(2052)
Leave the World Behind by Rumaan Alam(1991)
Iron Widow by Xiran Jay Zhao(1983)
Baby Bird by Seven Rue(1951)
Midnight Mass by Sierra Simone(1909)
A Little Life: A Novel by Hanya Yanagihara(1771)
Undercover Threat by Sharon Dunn(1689)
The Four Winds by Hannah Kristin(1679)
Bridgertons 2.5: The Viscount Who Loved Me [Epilogue] by Julia Quinn(1678)
The Warrior's Princess Prize by Carol Townend(1556)
Sister Fidelma 07 - The Monk Who Vanished by Peter Tremayne(1505)
Snowflakes by Ruth Ware(1493)
Facing the Mountain by Daniel James Brown(1443)
Dark Deception by Rina Kent(1440)
